﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;

namespace _220105BookSys.api.Tools.QueryParam
{
    public class BookQuery
    {
        public Guid Id { get; set; }

        //[Required]
        [Display(Name = "书籍名称"), StringLength(20, ErrorMessage = "长度4-20", MinimumLength = 4)]
        //[Column(TypeName = "nvarchar(20)")]
        public string Name { get; set; }

        //[Required]
        [Display(Name = "书籍简介"), StringLength(200, ErrorMessage = "长度4-200", MinimumLength = 4)]
        //[Column(TypeName = "nvarchar(200)")]
        public string Describe { get; set; }

        //[ForeignKey(nameof(BookType))]
        public Guid BookTypeId { get; set; }
        //public BookType BookType { get; set; }
    }
}
